Skip to content

Cleanups #195

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 5, 2017
Merged

Cleanups #195

merged 1 commit into from
Jan 5, 2017

Conversation

compnerd
Copy link
Member

No description provided.

@@ -356,14 +356,10 @@ DISPATCH_EXPORT DISPATCH_NOTHROW void dispatch_atfork_child(void);
do { (elm)->field.tqe_prev = NULL; } while (0)

#if DISPATCH_DEBUG
// sys/queue.h debugging
#if defined(__linux__)
#define QUEUE_MACRO_DEBUG 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this breaks people using libbsd-dev and doesn't hurt, please do not remove.
what you probably want to do is to both set QUEUE_MACRO_DEBUG and TRASHIT to support both (?)

@@ -24,9 +24,9 @@

#if !HAVE_GETPROGNAME

#ifdef __ANDROID__
#if defined(__ANDROID__)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please keep the #ifdef only the removal of the ) below is needed

@@ -16,6 +16,16 @@
#ifndef __DISPATCH__STUBS__INTERNAL
#define __DISPATCH__STUBS__INTERNAL

#if !defined(TAILQ_FOREACH_SAFE)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please keep consistent style and use #ifndef

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you haven't handled this review feedback.

Please use #ifndef and squash in a single commit before merge, thanks

(var) && ((temp) = TAILQ_NEXT((var), field), 1); (var) = (temp))
#endif

#if !defined(TRASHIT)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please don't do that, TRASHIT is only meant to be set in debug mode

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just following the android pattern, where the android_stubs.h always define it.

@@ -16,6 +16,16 @@
#ifndef __DISPATCH__STUBS__INTERNAL
#define __DISPATCH__STUBS__INTERNAL

#if !defined(TAILQ_FOREACH_SAFE)
#define TAILQ_FOREACH_SAFE(var, head, field, temp) \
for ((var) = TAILQ_FIRST((head)); \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use tabs for alignment

@MadCoder
Copy link
Contributor

@compnerd :

Just following the android pattern, where the android_stubs.h always define it.

I got the message through mail but couldn't find where it was made after your force push.
I didn't realize Android was doing that and it's wrong, TRASHIT and other similar macros are about poisoning the <sys/queue.h> macros, and does have a performance penalty cost for some things that are quite in hotpaths where you don't want it unless you debug. The Android port is wrong and ought to be fixed, would you mind doing it on the same pull request? the rest looks good

@compnerd
Copy link
Member Author

@MadCoder sure, I can squash it into the same change.

@compnerd
Copy link
Member Author

compnerd commented Jan 3, 2017

Gentle post-holiday ping for @MadCoder

Clean up trailing characters in android shims.  Only define the function
when used.  TAILQ_FOREACH_SAFE is unavailable in glibc as it is a BSD
specific macro.  Provide a definition for it in the Linux shims.  Only
define TRASHIT only on debug builds in android as well.
@compnerd
Copy link
Member Author

compnerd commented Jan 4, 2017

Address the last bit of the review comments that I had missed.

@compnerd
Copy link
Member Author

compnerd commented Jan 4, 2017

@swift-ci please test

@compnerd
Copy link
Member Author

compnerd commented Jan 4, 2017

Hmm, seems that I dont have swift-ci rights to this project. Mind running this through @MadCoder? BTW, whats the darwin-pending tag?

@MadCoder
Copy link
Contributor

MadCoder commented Jan 4, 2017

@swift-ci please test

@compnerd
Copy link
Member Author

compnerd commented Jan 5, 2017

It seems that the failure is unrelated?

@MadCoder MadCoder merged commit eb730eb into swiftlang:master Jan 5, 2017
@compnerd compnerd deleted the cleanups branch January 5, 2017 18:23
das pushed a commit that referenced this pull request Feb 21, 2017
Cleanups

Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants